import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/emergency/Emergency_event_process_entity.dart';

EmergencyEventProcessEntity $EmergencyEventProcessEntityFromJson(Map<String, dynamic> json) {
  final EmergencyEventProcessEntity emergencyEventProcessEntity = EmergencyEventProcessEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    emergencyEventProcessEntity.id = id;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    emergencyEventProcessEntity.companyCode = companyCode;
  }
  final String? accidentNameId = jsonConvert.convert<String>(json['accidentNameId']);
  if (accidentNameId != null) {
    emergencyEventProcessEntity.accidentNameId = accidentNameId;
  }
  final String? recordBy = jsonConvert.convert<String>(json['recordBy']);
  if (recordBy != null) {
    emergencyEventProcessEntity.recordBy = recordBy;
  }
  final String? recordTime = jsonConvert.convert<String>(json['recordTime']);
  if (recordTime != null) {
    emergencyEventProcessEntity.recordTime = recordTime;
  }
  final int? rescueGoodsPeople = jsonConvert.convert<int>(json['rescueGoodsPeople']);
  if (rescueGoodsPeople != null) {
    emergencyEventProcessEntity.rescueGoodsPeople = rescueGoodsPeople;
  }
  final String? rescueRemarks = jsonConvert.convert<String>(json['rescueRemarks']);
  if (rescueRemarks != null) {
    emergencyEventProcessEntity.rescueRemarks = rescueRemarks;
  }
  final String? rescueMeetingRecord = jsonConvert.convert<String>(json['rescueMeetingRecord']);
  if (rescueMeetingRecord != null) {
    emergencyEventProcessEntity.rescueMeetingRecord = rescueMeetingRecord;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    emergencyEventProcessEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    emergencyEventProcessEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    emergencyEventProcessEntity.createDate = createDate;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    emergencyEventProcessEntity.updateById = updateById;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    emergencyEventProcessEntity.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    emergencyEventProcessEntity.updateDate = updateDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    emergencyEventProcessEntity.deleted = deleted;
  }
  return emergencyEventProcessEntity;
}

Map<String, dynamic> $EmergencyEventProcessEntityToJson(EmergencyEventProcessEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['companyCode'] = entity.companyCode;
  data['accidentNameId'] = entity.accidentNameId;
  data['recordBy'] = entity.recordBy;
  data['recordTime'] = entity.recordTime;
  data['rescueGoodsPeople'] = entity.rescueGoodsPeople;
  data['rescueRemarks'] = entity.rescueRemarks;
  data['rescueMeetingRecord'] = entity.rescueMeetingRecord;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['updateById'] = entity.updateById;
  data['updateBy'] = entity.updateBy;
  data['updateDate'] = entity.updateDate;
  data['deleted'] = entity.deleted;
  return data;
}

extension EmergencyEventProcessEntityExtension on EmergencyEventProcessEntity {
  EmergencyEventProcessEntity copyWith({
    String? id,
    String? companyCode,
    String? accidentNameId,
    String? recordBy,
    String? recordTime,
    int? rescueGoodsPeople,
    String? rescueRemarks,
    String? rescueMeetingRecord,
    String? createBy,
    String? createById,
    String? createDate,
    String? updateById,
    String? updateBy,
    String? updateDate,
    String? deleted,
  }) {
    return EmergencyEventProcessEntity()
      ..id = id ?? this.id
      ..companyCode = companyCode ?? this.companyCode
      ..accidentNameId = accidentNameId ?? this.accidentNameId
      ..recordBy = recordBy ?? this.recordBy
      ..recordTime = recordTime ?? this.recordTime
      ..rescueGoodsPeople = rescueGoodsPeople ?? this.rescueGoodsPeople
      ..rescueRemarks = rescueRemarks ?? this.rescueRemarks
      ..rescueMeetingRecord = rescueMeetingRecord ?? this.rescueMeetingRecord
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..updateById = updateById ?? this.updateById
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..deleted = deleted ?? this.deleted;
  }
}
